package id.brian;

import android.graphics.Bitmap;

public class GraphicObject {
	private Bitmap mBitmap;
	private Coordinates mCoordinates;
	private Speed mSpeed;

	public GraphicObject(Bitmap bitmap) {
		mBitmap = bitmap;
		mCoordinates = new Coordinates();
		mSpeed = new Speed();
	}

	public Bitmap getBitmap() {
		//actual image
		return mBitmap;
	}

	public Coordinates getCoordinates() {
		//where it is
		return mCoordinates;
	}

	public Speed getSpeed() {
		//how fast
		return mSpeed;
	}


	public class Coordinates {
		private int x = 0;
		private int y = 0;

		public int getX() {
			return x + mBitmap.getWidth()/2;
		}
		public void setX(int x) {
			this.x = x - mBitmap.getWidth()/2;
		}
		public int getY() {
			return y + mBitmap.getHeight()/2;
		}
		public void setY(int y) {
			this.y = y - mBitmap.getHeight()/2;
		}

	}

	public class Speed {
		private int x = 0;
		private int y = -4;

		public int getX() {
			return x;
		}

		public void setX(int speed) {
			x = speed;
		}

		public int getY() {
			return y;
		}

		public void setY(int speed) {
			y = speed;
		}
	}
}